<template>
	<view class="content">
		<view class="forget-bg">
			<view v-model="form" class="forget-card">
				<view class="forget-input forget-margin-b">
					<input v-model="form.stuname" type="number" placeholder="请输入姓名" />
				</view>
				<view class="forget-input forget-margin-b">
					<input v-model="form.stuaccount" type="number" placeholder="请输入账号" />
				</view>
				<view class="forget-input">
					<input v-model="form.stupass" type="number" placeholder="请输入密码(8-16位)" />
				</view>
				<view class="forget-input forget-margin-b">
					<input v-model="form.stuemail" type="number" placeholder="请输入邮箱" />
				</view>
			</view>
		</view>
		<view class="forget-btn">
			<button class="landing" type="primary" @click="sturegister">注册</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello',
				form: {
					stuname: "",
					stuaccount: "",
					stupass: "",
					stuemail: ""
				}
			}
		},
		onLoad() {

		},
		methods: {
			sturegister() {
				this.$http('/sturegister', {
					stuName: this.form.stuname,
					stuAccount: this.form.stuaccount,
					stuPass: this.form.stupass,
					stuEmail: this.form.stuemail
				})
				.then((res) => {
					console.log(res);
					if (res.code == 200) {
						uni.navigateTo({
							url: "../login/login"
						})
					}
				})
			}
		}
	}
</script>

<style>
	.verify-left{
		width: calc(100% - 260upx);
	}
	.verify-right{
		padding-left: 20upx;
	}
	.verify-btn{
		height: 80upx;
		line-height: 80upx;
		font-size: 28upx;
		width: 240upx;
		border-radius: 8upx;
		background: linear-gradient(left,#FF978D, #FFBB69);
	}
	.verify-left,.verify-right{
		float: left;
	}
	.landing{
		height: 84upx;
		line-height: 84upx;
		border-radius: 44upx;
		font-size: 32upx;
		background: linear-gradient(left,#FF978D, #FFBB69);
	}
	.forget-btn{
		padding: 10upx 20upx;
		margin-top: 380upx;
	}

	.forget-input input{
		background: #F2F5F6;
		font-size: 28upx;
		padding: 10upx 25upx;
		height: 62upx;
		line-height: 62upx;
		border-radius: 8upx;
	}
	.forget-margin-b{
		margin-bottom: 25upx;
	}
	.forget-input{
		padding: 10upx 20upx;
		overflow: auto;
	}
	.forget-card{
		background: #fff;
		border-radius: 12upx;
		padding: 60upx 25upx;
		box-shadow: 0 6upx 18upx rgba(0,0,0,0.12);
		position: relative;
		margin-top: 120upx;
	}
	.forget-bg {
		height: 260upx;
		padding: 25upx;
		background: linear-gradient(#FF978D, #FFBB69);
	}
</style>
